<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>EquTemper: ETSubItem.cc Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="$relpath<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>/search.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">EquTemper&#160;<span id="projectnumber">1.01</span></div>
   <div id="projectbrief">An equation editor.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<script type="text/javascript">
function hasClass(ele,cls) {
  return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}

function addClass(ele,cls) {
  if (!this.hasClass(ele,cls)) ele.className += " "+cls;
}

function removeClass(ele,cls) {
  if (hasClass(ele,cls)) {
    var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
    ele.className=ele.className.replace(reg,' ');
  }
}

function toggleVisibility(linkObj) {
 var base = linkObj.getAttribute('id');
 var summary = document.getElementById(base + '-summary');
 var content = document.getElementById(base + '-content');
 var trigger = document.getElementById(base + '-trigger');
 if ( hasClass(linkObj,'closed') ) {
   summary.style.display = 'none';
   content.style.display = 'block';
   trigger.src = 'open.png';
   removeClass(linkObj,'closed');
   addClass(linkObj,'opened');
 } else if ( hasClass(linkObj,'opened') ) {
   summary.style.display = 'block';
   content.style.display = 'none';
   trigger.src = 'closed.png';
   removeClass(linkObj,'opened');
   addClass(linkObj,'closed');
 }
 return false;
}
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_e_t_sub_item_8cc.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">ETSubItem.cc</div>  </div>
</div>
<div class="contents">
<a href="_e_t_sub_item_8cc.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* ========================================================================= */</span>
<a name="l00002"></a>00002 <span class="comment">/* ------------------------------------------------------------------------- */</span><span class="comment"></span>
<a name="l00003"></a>00003 <span class="comment">/*!</span>
<a name="l00004"></a>00004 <span class="comment">  \file         ETSubItem.cc</span>
<a name="l00005"></a>00005 <span class="comment">  \date         september 2011</span>
<a name="l00006"></a>00006 <span class="comment">  \author       TNick</span>
<a name="l00007"></a>00007 <span class="comment"></span>
<a name="l00008"></a>00008 <span class="comment">  \brief        Contains the implementation for ETSubItem class</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment"></span>
<a name="l00011"></a>00011 <span class="comment">  Copyright (c) 2011, Nicu Tofan</span>
<a name="l00012"></a>00012 <span class="comment"> All rights reserved.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment"> Redistribution and use in source and binary forms, with or without</span>
<a name="l00015"></a>00015 <span class="comment"> modification, are permitted provided that the following conditions are met:</span>
<a name="l00016"></a>00016 <span class="comment"> * Redistributions of source code must retain the above copyright</span>
<a name="l00017"></a>00017 <span class="comment">   notice, this list of conditions and the following disclaimer.</span>
<a name="l00018"></a>00018 <span class="comment"> * Redistributions in binary form must reproduce the above copyright</span>
<a name="l00019"></a>00019 <span class="comment">   notice, this list of conditions and the following disclaimer in the</span>
<a name="l00020"></a>00020 <span class="comment">   documentation and/or other materials provided with the distribution.</span>
<a name="l00021"></a>00021 <span class="comment"> * Neither the name of the copyright holder nor the</span>
<a name="l00022"></a>00022 <span class="comment">   names of its contributors may be used to endorse or promote products</span>
<a name="l00023"></a>00023 <span class="comment">   derived from this software without specific prior written permission.</span>
<a name="l00024"></a>00024 <span class="comment"></span>
<a name="l00025"></a>00025 <span class="comment"> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS &quot;AS IS&quot; AND</span>
<a name="l00026"></a>00026 <span class="comment"> ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span>
<a name="l00027"></a>00027 <span class="comment"> WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span>
<a name="l00028"></a>00028 <span class="comment"> DISCLAIMED. IN NO EVENT SHALL NICU TOFAN BE LIABLE FOR ANY</span>
<a name="l00029"></a>00029 <span class="comment"> DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span>
<a name="l00030"></a>00030 <span class="comment"> (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span>
<a name="l00031"></a>00031 <span class="comment"> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span>
<a name="l00032"></a>00032 <span class="comment"> ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span>
<a name="l00033"></a>00033 <span class="comment"> (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span>
<a name="l00034"></a>00034 <span class="comment"> SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>
<a name="l00035"></a>00035 <span class="comment"></span>
<a name="l00036"></a>00036 <span class="comment">*/</span>
<a name="l00037"></a>00037 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00038"></a>00038 <span class="comment">/* ========================================================================= */</span>
<a name="l00039"></a>00039 <span class="comment">//</span>
<a name="l00040"></a>00040 <span class="comment">//</span>
<a name="l00041"></a>00041 <span class="comment">//</span>
<a name="l00042"></a>00042 <span class="comment">//</span>
<a name="l00043"></a>00043 <span class="comment">/*  INCLUDES    ------------------------------------------------------------ */</span>
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 <span class="preprocessor">#include    &lt;<a class="code" href="main_8h.html" title="Contains global definitions for application.">main.h</a>&gt;</span>
<a name="l00046"></a>00046 
<a name="l00047"></a>00047 <span class="preprocessor">#include    &lt;<a class="code" href="_e_t_sheet_view_8h.html" title="Contains the definition for ETSheetView class.">sheet/ETSheetView.h</a>&gt;</span>
<a name="l00048"></a>00048 <span class="preprocessor">#include    &lt;<a class="code" href="_e_t_sheet_8h.html" title="Contains the definition for ETSheet class.">sheet/ETSheet.h</a>&gt;</span>
<a name="l00049"></a>00049 <span class="preprocessor">#include    &lt;<a class="code" href="_e_t_i___cplx_txt_8h.html" title="Contains the definition for ETI_CplxTxt class.">sheet/ETI_CplxTxt.h</a>&gt;</span>
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 <span class="preprocessor">#include    &lt;<a class="code" href="_e_t_s_i___fract_8h.html" title="Contains the definition for ETSI_Fract class.">sheet/subitems/ETSI_Fract.h</a>&gt;</span>
<a name="l00052"></a>00052 <span class="preprocessor">#include    &lt;<a class="code" href="_e_t_s_i___h_text_8h.html" title="Contains the definition for ETSI_HText class.">sheet/subitems/ETSI_HText.h</a>&gt;</span>
<a name="l00053"></a>00053 <span class="preprocessor">#include    &lt;<a class="code" href="_e_t_s_i___integ_8h.html" title="Contains the definition for ETSI_Integ class.">sheet/subitems/ETSI_Integ.h</a>&gt;</span>
<a name="l00054"></a>00054 <span class="preprocessor">#include    &lt;<a class="code" href="_e_t_s_i___lim_8h.html" title="Contains the definition for ETSI_Lim class.">sheet/subitems/ETSI_Lim.h</a>&gt;</span>
<a name="l00055"></a>00055 <span class="preprocessor">#include    &lt;<a class="code" href="_e_t_s_i___logic_ac_8h.html" title="Contains the definition for ETSI_LogicAc class.">sheet/subitems/ETSI_LogicAc.h</a>&gt;</span>
<a name="l00056"></a>00056 <span class="preprocessor">#include    &lt;<a class="code" href="_e_t_s_i___matrix_8h.html" title="Contains the definition for ETSI_Matrix class.">sheet/subitems/ETSI_Matrix.h</a>&gt;</span>
<a name="l00057"></a>00057 <span class="preprocessor">#include    &lt;<a class="code" href="_e_t_s_i___radic_8h.html" title="Contains the definition for ETSI_Radic class.">sheet/subitems/ETSI_Radic.h</a>&gt;</span>
<a name="l00058"></a>00058 <span class="preprocessor">#include    &lt;<a class="code" href="_e_t_s_i___s_text_8h.html" title="Contains the definition for ETSI_SText class.">sheet/subitems/ETSI_SText.h</a>&gt;</span>
<a name="l00059"></a>00059 <span class="preprocessor">#include    &lt;<a class="code" href="_e_t_s_i___sum_8h.html" title="Contains the definition for ETSI_Sum class.">sheet/subitems/ETSI_Sum.h</a>&gt;</span>
<a name="l00060"></a>00060 <span class="preprocessor">#include    &lt;<a class="code" href="_e_t_s_i___root_8h.html" title="Contains the definition for ETSI_Root class.">sheet/subitems/ETSI_Root.h</a>&gt;</span>
<a name="l00061"></a>00061 
<a name="l00062"></a>00062 <span class="preprocessor">#include    &quot;<a class="code" href="_e_t_sub_item_8h.html" title="Contains the definition for ETSubItem class.">ETSubItem.h</a>&quot;</span>
<a name="l00063"></a>00063 
<a name="l00064"></a>00064 <span class="comment">/*  INCLUDES    ============================================================ */</span>
<a name="l00065"></a>00065 <span class="comment">//</span>
<a name="l00066"></a>00066 <span class="comment">//</span>
<a name="l00067"></a>00067 <span class="comment">//</span>
<a name="l00068"></a>00068 <span class="comment">//</span>
<a name="l00069"></a>00069 <span class="comment">/*  CLASS    --------------------------------------------------------------- */</span>
<a name="l00070"></a>00070 
<a name="l00071"></a>00071 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00072"></a><a class="code" href="class_e_t_sub_item.html#a3ef1bf5a6bda438050ce43d15a69bd08">00072</a> <a class="code" href="class_e_t_sub_item.html#a3ef1bf5a6bda438050ce43d15a69bd08" title="constructor">ETSubItem::ETSubItem</a>    ( <span class="keywordtype">void</span> )
<a name="l00073"></a>00073     : <a class="code" href="class_c_c___l2_d.html" title="class representing the list element in a linked list system">CC_L2D</a> ()
<a name="l00074"></a>00074 {
<a name="l00075"></a>00075     <span class="comment">/* itm_font initialises itself at creation time */</span>
<a name="l00076"></a>00076     <a class="code" href="class_e_t_sub_item.html#abbe3ddeaaaeb14e18837d7cfd4180fe3" title="color used to paint this item">itm_col</a> = QColor(Qt::white);
<a name="l00077"></a>00077     <a class="code" href="class_e_t_sub_item.html#abf16c501488190ec6a55b402978723c1" title="the rgb used to paint text, draw lines, ...">itm_pen</a> = 0;
<a name="l00078"></a>00078     <a class="code" href="class_e_t_sub_item.html#a8a82d3aad7a84597b451240dc75a0cb4" title="the boundingg box in local coordinates">bbox</a> = QRectF(0, 0, 0, 0);
<a name="l00079"></a>00079     <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a617508f4c9d8068e0e2017e2862ff482">DEFAULT_STATE</a>;
<a name="l00080"></a>00080     <a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>.fth_cplx = <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>;
<a name="l00081"></a>00081     <a class="code" href="class_e_t_sub_item.html#a3bf65adb5d5c0286f21791eb1d279c8f" title="position (in parent coordinate system)">x_pos</a> = 0;
<a name="l00082"></a>00082 }
<a name="l00083"></a>00083 <span class="comment">/* ========================================================================= */</span>
<a name="l00084"></a>00084 
<a name="l00085"></a>00085 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00086"></a><a class="code" href="class_e_t_sub_item.html#ade1f3cbfe48c23ecd3dfaf9e71040d39">00086</a> <a class="code" href="class_e_t_sub_item.html#ade1f3cbfe48c23ecd3dfaf9e71040d39" title="destructor">ETSubItem::~ETSubItem</a>   ( <span class="keywordtype">void</span> )
<a name="l00087"></a>00087 {
<a name="l00088"></a>00088 }
<a name="l00089"></a>00089 <span class="comment">/* ========================================================================= */</span>
<a name="l00090"></a>00090 
<a name="l00091"></a>00091 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00092"></a><a class="code" href="class_e_t_sub_item.html#a73078f093b83442fb1729f6f35bee29f">00092</a> <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> *       <a class="code" href="class_e_t_sub_item.html#a73078f093b83442fb1729f6f35bee29f" title="get the ETI_CplxTxt father (complex text)">ETSubItem::fatherCplx</a>       ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00093"></a>00093 <span class="keyword"></span>{
<a name="l00094"></a>00094     <span class="keyword">const</span> <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * itr_1 = <span class="keyword">this</span>;
<a name="l00095"></a>00095 
<a name="l00096"></a>00096     <span class="keywordflow">while</span> (!itr_1-&gt;<a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f" title="tell if this element is top level or not">isTopLevel</a>())
<a name="l00097"></a>00097     {
<a name="l00098"></a>00098         itr_1 = ((<a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> *)itr_1)-&gt;<a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>.<a class="code" href="class_e_t_sub_item.html#a52b851e88b4bd512c50142d3be784feb" title="parent sub-item">fth_sub_i</a>;
<a name="l00099"></a>00099         <span class="keywordflow">if</span> (itr_1 == <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)
<a name="l00100"></a>00100             <span class="keywordflow">return</span> <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>;
<a name="l00101"></a>00101     }
<a name="l00102"></a>00102 
<a name="l00103"></a>00103     <span class="keywordflow">return</span> itr_1-&gt;<a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>.<a class="code" href="class_e_t_sub_item.html#a4c061776d7be6a4be93d29a72b7d7789" title="the hosting item, used if this ETSubItem is at top level">fth_cplx</a>;
<a name="l00104"></a>00104 
<a name="l00105"></a>00105 }
<a name="l00106"></a>00106 <span class="comment">/* ========================================================================= */</span>
<a name="l00107"></a>00107 
<a name="l00108"></a>00108 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00109"></a><a class="code" href="class_e_t_sub_item.html#ab162bc8bf3933ee501bcbc599b6a40f6">00109</a> <span class="keywordtype">void</span>            <a class="code" href="class_e_t_sub_item.html#ab162bc8bf3933ee501bcbc599b6a40f6" title="marks this item and all it&#39;s parents as being required to be recomputed">ETSubItem::setSizeDirty</a>     (<a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> ** tp_fth)
<a name="l00110"></a>00110 {
<a name="l00111"></a>00111     <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> | <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055adf078dcde0bd69a7a700a6751056dee6">SIZE_DIRTY</a>);
<a name="l00112"></a>00112 
<a name="l00113"></a>00113     <span class="comment">/* iterate in all parents */</span>
<a name="l00114"></a>00114     <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * iter_i = <a class="code" href="class_e_t_sub_item.html#a0a367e98b76ea54e1d0c6edf7053330c" title="get the father item">fatherSubI</a>();
<a name="l00115"></a>00115     <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * iter_j = <span class="keyword">this</span>;
<a name="l00116"></a>00116     <span class="keywordflow">while</span> (iter_i != <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)
<a name="l00117"></a>00117     {
<a name="l00118"></a>00118         iter_i-&gt;<a class="code" href="class_e_t_sub_item.html#aefd171024f4fa2177be04d556fb5c1ea" title="marks this sub-item as having kids required to be recomputed">setKidSizeDirty</a>();
<a name="l00119"></a>00119         iter_j = iter_i;
<a name="l00120"></a>00120         iter_i = iter_i-&gt;<a class="code" href="class_e_t_sub_item.html#a0a367e98b76ea54e1d0c6edf7053330c" title="get the father item">fatherSubI</a>();
<a name="l00121"></a>00121     }
<a name="l00122"></a>00122     <span class="keywordflow">if</span> (tp_fth != <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)
<a name="l00123"></a>00123     {
<a name="l00124"></a>00124         *tp_fth = iter_j-&gt;<a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>.<a class="code" href="class_e_t_sub_item.html#a4c061776d7be6a4be93d29a72b7d7789" title="the hosting item, used if this ETSubItem is at top level">fth_cplx</a>;
<a name="l00125"></a>00125     }
<a name="l00126"></a>00126 }
<a name="l00127"></a>00127 <span class="comment">/* ========================================================================= */</span>
<a name="l00128"></a>00128 
<a name="l00129"></a>00129 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00130"></a><a class="code" href="class_e_t_sub_item.html#ad851ea369418f6017e39cc9c96c108db">00130</a> <span class="keywordtype">void</span>            <a class="code" href="class_e_t_sub_item.html#ad851ea369418f6017e39cc9c96c108db" title="set default font">ETSubItem::setFont</a>          (QFont new_font)
<a name="l00131"></a>00131 {
<a name="l00132"></a>00132     <a class="code" href="class_e_t_sub_item.html#a9c7318d8f6eaca5ffc2f9c04a2e2b3b3" title="the default font that is used to paint this item">itm_font</a> = new_font;
<a name="l00133"></a>00133     <a class="code" href="class_e_t_sub_item.html#ab162bc8bf3933ee501bcbc599b6a40f6" title="marks this item and all it&#39;s parents as being required to be recomputed">setSizeDirty</a>();
<a name="l00134"></a>00134 
<a name="l00135"></a>00135     <span class="keywordflow">if</span> (!<a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f" title="tell if this element is top level or not">isTopLevel</a>())
<a name="l00136"></a>00136     {
<a name="l00137"></a>00137         <span class="keywordflow">if</span> (<a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>.fth_sub_i-&gt;font() == new_font)
<a name="l00138"></a>00138         {
<a name="l00139"></a>00139             <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; (~<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a01ebc2d8cfadac52c4633ff69c2f6b31">FONT_MOD</a>));
<a name="l00140"></a>00140             <span class="keywordflow">return</span>;
<a name="l00141"></a>00141         }
<a name="l00142"></a>00142     }
<a name="l00143"></a>00143     <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> | <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a01ebc2d8cfadac52c4633ff69c2f6b31">FONT_MOD</a>);
<a name="l00144"></a>00144 }
<a name="l00145"></a>00145 <span class="comment">/* ========================================================================= */</span>
<a name="l00146"></a>00146 
<a name="l00147"></a>00147 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00148"></a><a class="code" href="class_e_t_sub_item.html#a47c036ee19c7e4557588f11d43c940fe">00148</a> <span class="keywordtype">void</span>            <a class="code" href="class_e_t_sub_item.html#a47c036ee19c7e4557588f11d43c940fe" title="set default color">ETSubItem::setColor</a>         (QColor new_color)
<a name="l00149"></a>00149 {
<a name="l00150"></a>00150     <a class="code" href="class_e_t_sub_item.html#abbe3ddeaaaeb14e18837d7cfd4180fe3" title="color used to paint this item">itm_col</a> = new_color;
<a name="l00151"></a>00151 
<a name="l00152"></a>00152     <span class="keywordflow">if</span> (!<a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f" title="tell if this element is top level or not">isTopLevel</a>())
<a name="l00153"></a>00153     {
<a name="l00154"></a>00154         <span class="keywordflow">if</span> (<a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>.fth_sub_i-&gt;color() == new_color)
<a name="l00155"></a>00155         {
<a name="l00156"></a>00156             <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; (~<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055adf362be8b7054ea6af97d43b7eb694ef">COL_MOD</a>));
<a name="l00157"></a>00157             <span class="keywordflow">return</span>;
<a name="l00158"></a>00158         }
<a name="l00159"></a>00159     }
<a name="l00160"></a>00160     <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> | <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055adf362be8b7054ea6af97d43b7eb694ef">COL_MOD</a>);
<a name="l00161"></a>00161 
<a name="l00162"></a>00162 }
<a name="l00163"></a>00163 <span class="comment">/* ========================================================================= */</span>
<a name="l00164"></a>00164 
<a name="l00165"></a>00165 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00166"></a><a class="code" href="class_e_t_sub_item.html#ad67d15830b8bf3c09c838cefe39fac59">00166</a> <span class="keywordtype">void</span>            <a class="code" href="class_e_t_sub_item.html#ad67d15830b8bf3c09c838cefe39fac59" title="set default color">ETSubItem::setPen</a>           (QRgb new_color)
<a name="l00167"></a>00167 {
<a name="l00168"></a>00168     <a class="code" href="class_e_t_sub_item.html#abf16c501488190ec6a55b402978723c1" title="the rgb used to paint text, draw lines, ...">itm_pen</a> = new_color;
<a name="l00169"></a>00169 
<a name="l00170"></a>00170     <span class="keywordflow">if</span> (!<a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f" title="tell if this element is top level or not">isTopLevel</a>())
<a name="l00171"></a>00171     {
<a name="l00172"></a>00172         <span class="keywordflow">if</span> (<a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>.fth_sub_i-&gt;pen() == new_color)
<a name="l00173"></a>00173         {
<a name="l00174"></a>00174             <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; (~<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a3d93efa3d56a84ecbd6a997dcacd22f5">PEN_MOD</a>));
<a name="l00175"></a>00175             <span class="keywordflow">return</span>;
<a name="l00176"></a>00176         }
<a name="l00177"></a>00177     }
<a name="l00178"></a>00178     <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> | <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a3d93efa3d56a84ecbd6a997dcacd22f5">PEN_MOD</a>);
<a name="l00179"></a>00179 
<a name="l00180"></a>00180 }
<a name="l00181"></a>00181 <span class="comment">/* ========================================================================= */</span>
<a name="l00182"></a>00182 
<a name="l00183"></a>00183 
<a name="l00184"></a>00184 
<a name="l00185"></a>00185 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00186"></a><a class="code" href="class_e_t_sub_item.html#a8f77fbbc99877833721e64159c488bc7">00186</a> <span class="keywordtype">void</span>            <a class="code" href="class_e_t_sub_item.html#a8f77fbbc99877833721e64159c488bc7" title="items need to call this function before proceeding with their painting">ETSubItem::prePaint</a>     (
<a name="l00187"></a>00187         <a class="code" href="struct_e_t_sub_item_1_1_paint_data.html" title="structure used with paint opperations to pass arguments arround">PaintData</a> * pd)
<a name="l00188"></a>00188 {
<a name="l00189"></a>00189 
<a name="l00190"></a>00190     <span class="comment">/* get the bounding box in painter&#39;s coordinate system */</span>
<a name="l00191"></a>00191     pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a0f6c3f8f1c64987ddab21eec810cbbc5">t_box</a> = <a class="code" href="class_e_t_sub_item.html#a8a82d3aad7a84597b451240dc75a0cb4" title="the boundingg box in local coordinates">bbox</a>;
<a name="l00192"></a>00192     pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a0f6c3f8f1c64987ddab21eec810cbbc5">t_box</a>.translate(pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a2e6c37ba0c975c968b515821d743d469">pt_ref</a>);
<a name="l00193"></a>00193     pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#adaf615abcea44238ca9d45203ad89ff3">painter</a>-&gt;save();
<a name="l00194"></a>00194 
<a name="l00195"></a>00195     <span class="comment">/* replace the font if that is needed */</span>
<a name="l00196"></a>00196     <span class="keywordflow">if</span> (!<a class="code" href="class_e_t_sub_item.html#a6a5005b03cbfc320dad9a38809a2717d" title="tell if the sub-item inherits the font or uses it&#39;s own">inheritsFont</a>())
<a name="l00197"></a>00197     {
<a name="l00198"></a>00198         pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#adaf615abcea44238ca9d45203ad89ff3">painter</a>-&gt;setFont(<a class="code" href="class_e_t_sub_item.html#a9c7318d8f6eaca5ffc2f9c04a2e2b3b3" title="the default font that is used to paint this item">itm_font</a>);
<a name="l00199"></a>00199     }
<a name="l00200"></a>00200 
<a name="l00201"></a>00201     <span class="keywordflow">if</span> (<a class="code" href="class_e_t_sub_item.html#aa9af4f4a692972fa0e6738a1680d8068" title="tell if visually selected; this is not the same thing as the current si">isSelected</a>())
<a name="l00202"></a>00202     {
<a name="l00203"></a>00203         pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#adaf615abcea44238ca9d45203ad89ff3">painter</a>-&gt;setBackground(QBrush(Qt::lightGray));
<a name="l00204"></a>00204         pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#adaf615abcea44238ca9d45203ad89ff3">painter</a>-&gt;fillRect(pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a0f6c3f8f1c64987ddab21eec810cbbc5">t_box</a>, QBrush(Qt::lightGray));
<a name="l00205"></a>00205         pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#adaf615abcea44238ca9d45203ad89ff3">painter</a>-&gt;setPen(Qt::black);
<a name="l00206"></a>00206     }
<a name="l00207"></a>00207     <span class="keywordflow">else</span>
<a name="l00208"></a>00208     {
<a name="l00209"></a>00209         <span class="comment">/* replace the color if that is needed */</span>
<a name="l00210"></a>00210         <span class="keywordflow">if</span> (!<a class="code" href="class_e_t_sub_item.html#aa883fef005da263c7b8465f9fde9ec7c" title="tell if the sub-item inherits the font or uses it&#39;s own">inheritsColor</a>())
<a name="l00211"></a>00211         {
<a name="l00212"></a>00212             pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#adaf615abcea44238ca9d45203ad89ff3">painter</a>-&gt;setBackground(QBrush(<a class="code" href="class_e_t_sub_item.html#abbe3ddeaaaeb14e18837d7cfd4180fe3" title="color used to paint this item">itm_col</a>));
<a name="l00213"></a>00213             pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#adaf615abcea44238ca9d45203ad89ff3">painter</a>-&gt;fillRect(pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a0f6c3f8f1c64987ddab21eec810cbbc5">t_box</a>, QBrush(<a class="code" href="class_e_t_sub_item.html#abbe3ddeaaaeb14e18837d7cfd4180fe3" title="color used to paint this item">itm_col</a>));
<a name="l00214"></a>00214         }
<a name="l00215"></a>00215 
<a name="l00216"></a>00216         <span class="comment">/* replace the pen if that is needed */</span>
<a name="l00217"></a>00217         <span class="keywordflow">if</span> (!<a class="code" href="class_e_t_sub_item.html#a864c91187ae6dfbd7420b5a5bc192369" title="tell if the sub-item inherits the font or uses it&#39;s own">inheritsPen</a>())
<a name="l00218"></a>00218         {
<a name="l00219"></a>00219             pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#adaf615abcea44238ca9d45203ad89ff3">painter</a>-&gt;setPen(QColor(<a class="code" href="class_e_t_sub_item.html#abf16c501488190ec6a55b402978723c1" title="the rgb used to paint text, draw lines, ...">itm_pen</a>));
<a name="l00220"></a>00220         }
<a name="l00221"></a>00221     }
<a name="l00222"></a>00222 }
<a name="l00223"></a>00223 <span class="comment">/* ========================================================================= */</span>
<a name="l00224"></a>00224 
<a name="l00225"></a>00225 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00226"></a><a class="code" href="class_e_t_sub_item.html#af54fd0cff1c98f906d151a187438f4b6">00226</a> <span class="keywordtype">void</span>            <a class="code" href="class_e_t_sub_item.html#af54fd0cff1c98f906d151a187438f4b6" title="items need to call this function after they&#39;ve done their painting">ETSubItem::postPaint</a>        (
<a name="l00227"></a>00227         <a class="code" href="struct_e_t_sub_item_1_1_paint_data.html" title="structure used with paint opperations to pass arguments arround">PaintData</a> * pd)
<a name="l00228"></a>00228 {
<a name="l00229"></a>00229 
<a name="l00230"></a>00230     <span class="comment">/* mark current item */</span>
<a name="l00231"></a>00231     <span class="keywordflow">if</span> (pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a14035ccfd0985a0c5c4d938131922962">vp</a>-&gt;<a class="code" href="class_e_t_sheet_view.html#af772d536773e6acb31413fb6a5f8cade" title="tell which is currenly selected sub-item in this view">currentSubI</a>() == <span class="keyword">this</span>)
<a name="l00232"></a>00232     {
<a name="l00233"></a>00233         qreal pen_sz;
<a name="l00234"></a>00234         <span class="keywordflow">if</span> (pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a14035ccfd0985a0c5c4d938131922962">vp</a>-&gt;<a class="code" href="class_e_t_sheet_view.html#a1e9035cd7b62a675ee925f6ab70f4712" title="return current scale of this view to the scene">getScale</a>() &lt; 1.44)
<a name="l00235"></a>00235         {
<a name="l00236"></a>00236             pen_sz = 0;
<a name="l00237"></a>00237         }
<a name="l00238"></a>00238         <span class="keywordflow">else</span>
<a name="l00239"></a>00239         {
<a name="l00240"></a>00240             pen_sz = 0.7;
<a name="l00241"></a>00241         }
<a name="l00242"></a>00242         <span class="keyword">const</span> QColor bgcolor( <span class="comment">// ensure good contrast against fgcolor</span>
<a name="l00243"></a>00243                               <a class="code" href="class_e_t_sub_item.html#abbe3ddeaaaeb14e18837d7cfd4180fe3" title="color used to paint this item">itm_col</a>.red()   &gt; 127 ? 0 : 255,
<a name="l00244"></a>00244                               <a class="code" href="class_e_t_sub_item.html#abbe3ddeaaaeb14e18837d7cfd4180fe3" title="color used to paint this item">itm_col</a>.green() &gt; 127 ? 0 : 255,
<a name="l00245"></a>00245                               <a class="code" href="class_e_t_sub_item.html#abbe3ddeaaaeb14e18837d7cfd4180fe3" title="color used to paint this item">itm_col</a>.blue()  &gt; 127 ? 0 : 255);
<a name="l00246"></a>00246 
<a name="l00247"></a>00247         pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#adaf615abcea44238ca9d45203ad89ff3">painter</a>-&gt;setPen(QPen(bgcolor, pen_sz, Qt::DotLine));
<a name="l00248"></a>00248 
<a name="l00249"></a>00249         pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#adaf615abcea44238ca9d45203ad89ff3">painter</a>-&gt;drawLine(
<a name="l00250"></a>00250                     pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a0f6c3f8f1c64987ddab21eec810cbbc5">t_box</a>.bottomLeft(),
<a name="l00251"></a>00251                     pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a0f6c3f8f1c64987ddab21eec810cbbc5">t_box</a>.bottomRight());
<a name="l00252"></a>00252         <span class="keywordflow">if</span> (pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a14035ccfd0985a0c5c4d938131922962">vp</a>-&gt;<a class="code" href="class_e_t_sheet_view.html#a566550e7c12d84a8d187f2607ef889f0" title="tells if the sellection appears on the left (true) or on the right (false)">selIsLeft</a>())
<a name="l00253"></a>00253         {
<a name="l00254"></a>00254             pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#adaf615abcea44238ca9d45203ad89ff3">painter</a>-&gt;drawLine(
<a name="l00255"></a>00255                         pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a0f6c3f8f1c64987ddab21eec810cbbc5">t_box</a>.bottomLeft(),
<a name="l00256"></a>00256                         pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a0f6c3f8f1c64987ddab21eec810cbbc5">t_box</a>.topLeft());
<a name="l00257"></a>00257         }
<a name="l00258"></a>00258         <span class="keywordflow">else</span>
<a name="l00259"></a>00259         {
<a name="l00260"></a>00260             pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#adaf615abcea44238ca9d45203ad89ff3">painter</a>-&gt;drawLine(
<a name="l00261"></a>00261                         pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a0f6c3f8f1c64987ddab21eec810cbbc5">t_box</a>.bottomRight(),
<a name="l00262"></a>00262                         pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a0f6c3f8f1c64987ddab21eec810cbbc5">t_box</a>.topRight());
<a name="l00263"></a>00263         }
<a name="l00264"></a>00264     }
<a name="l00265"></a>00265     <span class="keywordflow">else</span>
<a name="l00266"></a>00266     { <span class="comment">/// @todo use code below only as needed</span>
<a name="l00267"></a>00267 <span class="comment"></span><span class="comment">//      QPen pn_t = pd-&gt;painter-&gt;pen();</span>
<a name="l00268"></a>00268 <span class="comment">//      QPen new_p;</span>
<a name="l00269"></a>00269 <span class="comment">//      new_p.setColor(QColor(Qt::black));</span>
<a name="l00270"></a>00270 <span class="comment">//      new_p.setCosmetic(true);</span>
<a name="l00271"></a>00271 <span class="comment">//      new_p.setCapStyle(Qt::RoundCap);</span>
<a name="l00272"></a>00272 <span class="comment">//      new_p.setStyle(Qt::DotLine);</span>
<a name="l00273"></a>00273 <span class="comment">//      new_p.setJoinStyle(Qt::RoundJoin);</span>
<a name="l00274"></a>00274 <span class="comment">//      new_p.setWidth(1);</span>
<a name="l00275"></a>00275 
<a name="l00276"></a>00276 <span class="comment">//      pd-&gt;painter-&gt;setPen(new_p);</span>
<a name="l00277"></a>00277 
<a name="l00278"></a>00278 <span class="comment">//      pd-&gt;painter-&gt;drawRect(pd-&gt;t_box);</span>
<a name="l00279"></a>00279 
<a name="l00280"></a>00280 <span class="comment">//      pd-&gt;painter-&gt;setPen(pn_t);</span>
<a name="l00281"></a>00281     }
<a name="l00282"></a>00282 
<a name="l00283"></a>00283     pd-&gt;<a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#adaf615abcea44238ca9d45203ad89ff3">painter</a>-&gt;restore();
<a name="l00284"></a>00284 
<a name="l00285"></a>00285     <span class="keywordflow">return</span>;
<a name="l00286"></a>00286 }
<a name="l00287"></a>00287 <span class="comment">/* ========================================================================= */</span>
<a name="l00288"></a>00288 
<a name="l00289"></a>00289 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00290"></a><a class="code" href="class_e_t_sub_item.html#adc680ea038b38e9d6aa78d1bd3e1de37">00290</a> <span class="keywordtype">void</span>            <a class="code" href="class_e_t_sub_item.html#adc680ea038b38e9d6aa78d1bd3e1de37" title="the item is left from the top side">ETSubItem::navLeaveTop</a>          (
<a name="l00291"></a>00291         <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> * fth, <a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> * vp )
<a name="l00292"></a>00292 {
<a name="l00293"></a>00293 
<a name="l00294"></a>00294     <span class="keywordflow">if</span> (<a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f" title="tell if this element is top level or not">isTopLevel</a>())
<a name="l00295"></a>00295     {   <span class="comment">/* this is outside our scope.  */</span>
<a name="l00296"></a>00296         <span class="comment">/* The viewport shall select another item */</span>
<a name="l00297"></a>00297 
<a name="l00298"></a>00298         vp-&gt;<a class="code" href="class_e_t_sheet_view.html#a9f76384ab43367dcd137672d174d2ee4" title="item provided in argument requests selecting first item above it">navLeaveTop</a>(<a class="code" href="class_e_t_sub_item.html#a73078f093b83442fb1729f6f35bee29f" title="get the ETI_CplxTxt father (complex text)">fatherCplx</a>());
<a name="l00299"></a>00299         <span class="keywordflow">return</span>;
<a name="l00300"></a>00300     }
<a name="l00301"></a>00301 
<a name="l00302"></a>00302     <span class="comment">/* if the father has another kid above this one, select that */</span>
<a name="l00303"></a>00303     <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * parent_si = <a class="code" href="class_e_t_sub_item.html#a0a367e98b76ea54e1d0c6edf7053330c" title="get the father item">fatherSubI</a>();
<a name="l00304"></a>00304     <span class="keywordflow">if</span> (parent_si-&gt;<a class="code" href="class_e_t_sub_item.html#a9c8058596345f152fe9260e6d4f85839" title="used by kids to request a move up">kidNavReq_up</a>(vp, <span class="keyword">this</span>))
<a name="l00305"></a>00305     {
<a name="l00306"></a>00306         <span class="keywordflow">return</span>;
<a name="l00307"></a>00307     }
<a name="l00308"></a>00308 
<a name="l00309"></a>00309     <span class="comment">/* default to selecting the parent */</span>
<a name="l00310"></a>00310     vp-&gt;<a class="code" href="class_e_t_sheet_view.html#ae2acde853ced4e5b49913cc048fa5abc" title="inform the view that a new current item was decided">setCurrentSubI</a>(fth, parent_si);
<a name="l00311"></a>00311 <span class="comment"></span>
<a name="l00312"></a>00312 <span class="comment">    /// @todo Option to skip the parent (CTRL, maybe) and go to item above</span>
<a name="l00313"></a>00313 <span class="comment"></span>
<a name="l00314"></a>00314 }
<a name="l00315"></a>00315 <span class="comment">/* ========================================================================= */</span>
<a name="l00316"></a>00316 
<a name="l00317"></a>00317 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00318"></a><a class="code" href="class_e_t_sub_item.html#a5adba9613cefb440eb63e1c309bed50c">00318</a> <span class="keywordtype">void</span>            <a class="code" href="class_e_t_sub_item.html#a5adba9613cefb440eb63e1c309bed50c" title="the item is left from the bottom side">ETSubItem::navLeaveBtm</a>          (
<a name="l00319"></a>00319         <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> * fth, <a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> * vp )
<a name="l00320"></a>00320 {
<a name="l00321"></a>00321 
<a name="l00322"></a>00322     <span class="keywordflow">if</span> (<a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f" title="tell if this element is top level or not">isTopLevel</a>())
<a name="l00323"></a>00323     {   <span class="comment">/* this is outside our scope.  */</span>
<a name="l00324"></a>00324         <span class="comment">/* The viewport shall select another item */</span>
<a name="l00325"></a>00325 
<a name="l00326"></a>00326         vp-&gt;<a class="code" href="class_e_t_sheet_view.html#aa3688736fb84b3349bf2200d70949ad4" title="item provided in argument requests selecting first item below i">navLeaveBtm</a>(<a class="code" href="class_e_t_sub_item.html#a73078f093b83442fb1729f6f35bee29f" title="get the ETI_CplxTxt father (complex text)">fatherCplx</a>());
<a name="l00327"></a>00327         <span class="keywordflow">return</span>;
<a name="l00328"></a>00328     }
<a name="l00329"></a>00329 
<a name="l00330"></a>00330     <span class="comment">/* if the father has another kid above this one, select that */</span>
<a name="l00331"></a>00331     <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * parent_si = <a class="code" href="class_e_t_sub_item.html#a0a367e98b76ea54e1d0c6edf7053330c" title="get the father item">fatherSubI</a>();
<a name="l00332"></a>00332     <span class="keywordflow">if</span> (parent_si-&gt;<a class="code" href="class_e_t_sub_item.html#a2ba848a73372248b483a684171cef49f" title="used by kids to request a move down">kidNavReq_down</a>(vp, <span class="keyword">this</span>))
<a name="l00333"></a>00333     {
<a name="l00334"></a>00334         <span class="keywordflow">return</span>;
<a name="l00335"></a>00335     }
<a name="l00336"></a>00336 
<a name="l00337"></a>00337     <span class="comment">/* default to selecting the parent */</span>
<a name="l00338"></a>00338     vp-&gt;<a class="code" href="class_e_t_sheet_view.html#ae2acde853ced4e5b49913cc048fa5abc" title="inform the view that a new current item was decided">setCurrentSubI</a>(fth, parent_si);
<a name="l00339"></a>00339 <span class="comment"></span>
<a name="l00340"></a>00340 <span class="comment">    /// @todo Option to skip the parent (CTRL, maybe) and go to item below</span>
<a name="l00341"></a>00341 <span class="comment"></span>}
<a name="l00342"></a>00342 <span class="comment">/* ========================================================================= */</span>
<a name="l00343"></a>00343 
<a name="l00344"></a>00344 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00345"></a><a class="code" href="class_e_t_sub_item.html#a5ddcb4f6470717f4e54d9170a06de0e9">00345</a> <span class="keywordtype">void</span>            <a class="code" href="class_e_t_sub_item.html#a5ddcb4f6470717f4e54d9170a06de0e9" title="the item is left from the top side">ETSubItem::navLeaveLeft</a>         (
<a name="l00346"></a>00346         <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> * fth, <a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> * vp )
<a name="l00347"></a>00347 {
<a name="l00348"></a>00348 
<a name="l00349"></a>00349     <span class="comment">/* select previous item in this chain, if available */</span>
<a name="l00350"></a>00350     <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * sit_sib = <a class="code" href="class_e_t_sub_item.html#abb6564cd7327657f8739dde913dda297" title="return previous item">prev</a>();
<a name="l00351"></a>00351     <span class="keywordflow">if</span> (sit_sib != <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)
<a name="l00352"></a>00352     {
<a name="l00353"></a>00353         vp-&gt;<a class="code" href="class_e_t_sheet_view.html#ae2acde853ced4e5b49913cc048fa5abc" title="inform the view that a new current item was decided">setCurrentSubI</a>(fth, sit_sib);
<a name="l00354"></a>00354         vp-&gt;<a class="code" href="class_e_t_sheet_view.html#a66c17e719116958234212c3a82310300" title="informs the viewport that the selection is on the left side">setSelLeft</a>();
<a name="l00355"></a>00355         <span class="keywordflow">return</span>;
<a name="l00356"></a>00356     }
<a name="l00357"></a>00357 
<a name="l00358"></a>00358     <span class="keywordflow">if</span> (<a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f" title="tell if this element is top level or not">isTopLevel</a>())
<a name="l00359"></a>00359     {   <span class="comment">/* this is outside our scope.  */</span>
<a name="l00360"></a>00360         <span class="comment">/* The viewport shall select another item */</span>
<a name="l00361"></a>00361 
<a name="l00362"></a>00362         vp-&gt;<a class="code" href="class_e_t_sheet_view.html#ad382918511324f8cd92443b82de092b1" title="item provided in argument requests selecting first item to it&#39;s left">navLeaveLeft</a>(<a class="code" href="class_e_t_sub_item.html#a73078f093b83442fb1729f6f35bee29f" title="get the ETI_CplxTxt father (complex text)">fatherCplx</a>());
<a name="l00363"></a>00363         <span class="keywordflow">return</span>;
<a name="l00364"></a>00364     }
<a name="l00365"></a>00365 
<a name="l00366"></a>00366     <span class="comment">/* select the parent on the left side */</span>
<a name="l00367"></a>00367     vp-&gt;<a class="code" href="class_e_t_sheet_view.html#ae2acde853ced4e5b49913cc048fa5abc" title="inform the view that a new current item was decided">setCurrentSubI</a>(fth, <a class="code" href="class_e_t_sub_item.html#a0a367e98b76ea54e1d0c6edf7053330c" title="get the father item">fatherSubI</a>());
<a name="l00368"></a>00368     vp-&gt;<a class="code" href="class_e_t_sheet_view.html#a66c17e719116958234212c3a82310300" title="informs the viewport that the selection is on the left side">setSelLeft</a>();
<a name="l00369"></a>00369 
<a name="l00370"></a>00370 }
<a name="l00371"></a>00371 <span class="comment">/* ========================================================================= */</span>
<a name="l00372"></a>00372 
<a name="l00373"></a>00373 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00374"></a><a class="code" href="class_e_t_sub_item.html#adb2c1b3352378d14c310a97a119e8aed">00374</a> <span class="keywordtype">void</span>            <a class="code" href="class_e_t_sub_item.html#adb2c1b3352378d14c310a97a119e8aed" title="the item is left from the bottom side">ETSubItem::navLeaveRight</a>        (
<a name="l00375"></a>00375         <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> * fth, <a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> * vp )
<a name="l00376"></a>00376 {
<a name="l00377"></a>00377     <span class="comment">/* select next item in this chain, if available */</span>
<a name="l00378"></a>00378     <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * sit_sib = <a class="code" href="class_e_t_sub_item.html#a3df9a6599da92f5f26e8d030d5080df9" title="return next item">next</a>();
<a name="l00379"></a>00379     <span class="keywordflow">if</span> (sit_sib != <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)
<a name="l00380"></a>00380     {
<a name="l00381"></a>00381         vp-&gt;<a class="code" href="class_e_t_sheet_view.html#ae2acde853ced4e5b49913cc048fa5abc" title="inform the view that a new current item was decided">setCurrentSubI</a>(fth, sit_sib);
<a name="l00382"></a>00382         vp-&gt;<a class="code" href="class_e_t_sheet_view.html#ae87a30f64df86317740a116b0af322f0" title="informs the viewport that the selection is on the right side">setSelRight</a>();
<a name="l00383"></a>00383         <span class="keywordflow">return</span>;
<a name="l00384"></a>00384     }
<a name="l00385"></a>00385 
<a name="l00386"></a>00386     <span class="keywordflow">if</span> (<a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f" title="tell if this element is top level or not">isTopLevel</a>())
<a name="l00387"></a>00387     {   <span class="comment">/* this is outside our scope.  */</span>
<a name="l00388"></a>00388         <span class="comment">/* The viewport shall select another item */</span>
<a name="l00389"></a>00389 
<a name="l00390"></a>00390         vp-&gt;<a class="code" href="class_e_t_sheet_view.html#a156cebbc44e1edc688673fbccddaa67e" title="item provided in argument requests selecting first item to it&#39;s right">navLeaveRight</a>(<a class="code" href="class_e_t_sub_item.html#a73078f093b83442fb1729f6f35bee29f" title="get the ETI_CplxTxt father (complex text)">fatherCplx</a>());
<a name="l00391"></a>00391         <span class="keywordflow">return</span>;
<a name="l00392"></a>00392     }
<a name="l00393"></a>00393 
<a name="l00394"></a>00394     <span class="comment">/* select the parent on the left side */</span>
<a name="l00395"></a>00395     vp-&gt;<a class="code" href="class_e_t_sheet_view.html#ae2acde853ced4e5b49913cc048fa5abc" title="inform the view that a new current item was decided">setCurrentSubI</a>(fth, <a class="code" href="class_e_t_sub_item.html#a0a367e98b76ea54e1d0c6edf7053330c" title="get the father item">fatherSubI</a>());
<a name="l00396"></a>00396     vp-&gt;<a class="code" href="class_e_t_sheet_view.html#ae87a30f64df86317740a116b0af322f0" title="informs the viewport that the selection is on the right side">setSelRight</a>();
<a name="l00397"></a>00397 
<a name="l00398"></a>00398 }
<a name="l00399"></a>00399 <span class="comment">/* ========================================================================= */</span>
<a name="l00400"></a>00400 
<a name="l00401"></a>00401 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00402"></a><a class="code" href="class_e_t_sub_item.html#aae728c65d8df5afa81d9fa09450b3935">00402</a> <span class="keywordtype">void</span>            <a class="code" href="class_e_t_sub_item.html#aae728c65d8df5afa81d9fa09450b3935" title="recieves navigation keys">ETSubItem::navKey</a>       (
<a name="l00403"></a>00403         <a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> * vp, Qt::Key key)
<a name="l00404"></a>00404 {
<a name="l00405"></a>00405     <span class="comment">/* it is implied that this is the current item in the viewport */</span>
<a name="l00406"></a>00406     Q_ASSERT(vp-&gt;<a class="code" href="class_e_t_sheet_view.html#af772d536773e6acb31413fb6a5f8cade" title="tell which is currenly selected sub-item in this view">currentSubI</a>() == <span class="keyword">this</span>);
<a name="l00407"></a>00407 
<a name="l00408"></a>00408     <span class="keywordflow">switch</span> (key)        {
<a name="l00409"></a>00409     <span class="keywordflow">case</span>    Qt::Key_Up:         {
<a name="l00410"></a>00410             <a class="code" href="class_e_t_sub_item.html#adc680ea038b38e9d6aa78d1bd3e1de37" title="the item is left from the top side">navLeaveTop</a>(vp-&gt;<a class="code" href="class_e_t_sheet_view.html#ace5bbf9569571e95b2cb3e4ca010ae76" title="tell which is the parent for currenly selected sub-item in this view">currentItem</a>(), vp);
<a name="l00411"></a>00411             <span class="keywordflow">break</span>;}
<a name="l00412"></a>00412     <span class="keywordflow">case</span>    Qt::Key_Down:       {
<a name="l00413"></a>00413             <a class="code" href="class_e_t_sub_item.html#a5adba9613cefb440eb63e1c309bed50c" title="the item is left from the bottom side">navLeaveBtm</a>(vp-&gt;<a class="code" href="class_e_t_sheet_view.html#ace5bbf9569571e95b2cb3e4ca010ae76" title="tell which is the parent for currenly selected sub-item in this view">currentItem</a>(), vp);
<a name="l00414"></a>00414             <span class="keywordflow">break</span>;}
<a name="l00415"></a>00415     <span class="keywordflow">case</span>    Qt::Key_Left:       {
<a name="l00416"></a>00416             <span class="keywordflow">if</span> (vp-&gt;<a class="code" href="class_e_t_sheet_view.html#a566550e7c12d84a8d187f2607ef889f0" title="tells if the sellection appears on the left (true) or on the right (false)">selIsLeft</a>())
<a name="l00417"></a>00417                 {
<a name="l00418"></a>00418                     <a class="code" href="class_e_t_sub_item.html#a5ddcb4f6470717f4e54d9170a06de0e9" title="the item is left from the top side">navLeaveLeft</a>(vp-&gt;<a class="code" href="class_e_t_sheet_view.html#ace5bbf9569571e95b2cb3e4ca010ae76" title="tell which is the parent for currenly selected sub-item in this view">currentItem</a>(), vp);
<a name="l00419"></a>00419                 }
<a name="l00420"></a>00420             <span class="keywordflow">else</span>
<a name="l00421"></a>00421                 {
<a name="l00422"></a>00422                     vp-&gt;<a class="code" href="class_e_t_sheet_view.html#a66c17e719116958234212c3a82310300" title="informs the viewport that the selection is on the left side">setSelLeft</a>();
<a name="l00423"></a>00423                 }
<a name="l00424"></a>00424             <span class="keywordflow">break</span>;}
<a name="l00425"></a>00425     <span class="keywordflow">case</span>    Qt::Key_Right:      {
<a name="l00426"></a>00426             <span class="keywordflow">if</span> (vp-&gt;<a class="code" href="class_e_t_sheet_view.html#a566550e7c12d84a8d187f2607ef889f0" title="tells if the sellection appears on the left (true) or on the right (false)">selIsLeft</a>())
<a name="l00427"></a>00427                 {
<a name="l00428"></a>00428                     vp-&gt;<a class="code" href="class_e_t_sheet_view.html#ae87a30f64df86317740a116b0af322f0" title="informs the viewport that the selection is on the right side">setSelRight</a>();
<a name="l00429"></a>00429                 }
<a name="l00430"></a>00430             <span class="keywordflow">else</span>
<a name="l00431"></a>00431                 {
<a name="l00432"></a>00432                     <a class="code" href="class_e_t_sub_item.html#adb2c1b3352378d14c310a97a119e8aed" title="the item is left from the bottom side">navLeaveRight</a>(vp-&gt;<a class="code" href="class_e_t_sheet_view.html#ace5bbf9569571e95b2cb3e4ca010ae76" title="tell which is the parent for currenly selected sub-item in this view">currentItem</a>(), vp);
<a name="l00433"></a>00433                 }
<a name="l00434"></a>00434             <span class="keywordflow">break</span>;}
<a name="l00435"></a>00435     <span class="keywordflow">default</span>:                    {
<a name="l00436"></a>00436         qDebug() &lt;&lt; <span class="stringliteral">&quot;ETSubItem::navKey finds the value &quot;</span>
<a name="l00437"></a>00437                  &lt;&lt; key &lt;&lt; <span class="stringliteral">&quot; inappropriate.&quot;</span>;
<a name="l00438"></a>00438         <span class="keywordflow">break</span>;}
<a name="l00439"></a>00439     }
<a name="l00440"></a>00440 
<a name="l00441"></a>00441     <span class="comment">/* this may not be the best approach, as it tiggers a redraw in all</span>
<a name="l00442"></a>00442 <span class="comment">      viewports and it redraws entire item while it might be that only a</span>
<a name="l00443"></a>00443 <span class="comment">      part must be redrawn */</span>
<a name="l00444"></a>00444     vp-&gt;<a class="code" href="class_e_t_sheet_view.html#ace5bbf9569571e95b2cb3e4ca010ae76" title="tell which is the parent for currenly selected sub-item in this view">currentItem</a>()-&gt;update();
<a name="l00445"></a>00445 
<a name="l00446"></a>00446 }
<a name="l00447"></a>00447 <span class="comment">/* ========================================================================= */</span>
<a name="l00448"></a>00448 
<a name="l00449"></a>00449 
<a name="l00450"></a>00450 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00451"></a><a class="code" href="class_e_t_sub_item.html#a272d8d9d868d76ec81cf4ec697d2639e">00451</a> QFont           <a class="code" href="class_e_t_sub_item.html#a272d8d9d868d76ec81cf4ec697d2639e" title="default font">ETSubItem::font</a>         ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00452"></a>00452 <span class="keyword"></span>{
<a name="l00453"></a>00453     <span class="keywordflow">if</span> (!<a class="code" href="class_e_t_sub_item.html#a6a5005b03cbfc320dad9a38809a2717d" title="tell if the sub-item inherits the font or uses it&#39;s own">inheritsFont</a>())
<a name="l00454"></a>00454     {
<a name="l00455"></a>00455         <span class="keywordflow">return</span> <a class="code" href="class_e_t_sub_item.html#a9c7318d8f6eaca5ffc2f9c04a2e2b3b3" title="the default font that is used to paint this item">itm_font</a>;
<a name="l00456"></a>00456     }
<a name="l00457"></a>00457     <span class="keyword">const</span> <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a>* itr_i = <span class="keyword">this</span>;
<a name="l00458"></a>00458 
<a name="l00459"></a>00459     <span class="keywordflow">while</span> (!itr_i-&gt;<a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f" title="tell if this element is top level or not">isTopLevel</a>())
<a name="l00460"></a>00460     {
<a name="l00461"></a>00461         <span class="keywordflow">if</span> (!itr_i-&gt;<a class="code" href="class_e_t_sub_item.html#a6a5005b03cbfc320dad9a38809a2717d" title="tell if the sub-item inherits the font or uses it&#39;s own">inheritsFont</a>())
<a name="l00462"></a>00462         {
<a name="l00463"></a>00463             <span class="keywordflow">return</span> itr_i-&gt;<a class="code" href="class_e_t_sub_item.html#a9c7318d8f6eaca5ffc2f9c04a2e2b3b3" title="the default font that is used to paint this item">itm_font</a>;
<a name="l00464"></a>00464         }
<a name="l00465"></a>00465         itr_i = itr_i-&gt;<a class="code" href="class_e_t_sub_item.html#a0a367e98b76ea54e1d0c6edf7053330c" title="get the father item">fatherSubI</a>();
<a name="l00466"></a>00466     }
<a name="l00467"></a>00467     <span class="keywordflow">if</span> (!itr_i-&gt;<a class="code" href="class_e_t_sub_item.html#a6a5005b03cbfc320dad9a38809a2717d" title="tell if the sub-item inherits the font or uses it&#39;s own">inheritsFont</a>())
<a name="l00468"></a>00468     {
<a name="l00469"></a>00469         <span class="keywordflow">return</span> itr_i-&gt;<a class="code" href="class_e_t_sub_item.html#a9c7318d8f6eaca5ffc2f9c04a2e2b3b3" title="the default font that is used to paint this item">itm_font</a>;
<a name="l00470"></a>00470     }
<a name="l00471"></a>00471     <span class="keywordflow">return</span> QFont();
<a name="l00472"></a>00472 }
<a name="l00473"></a>00473 <span class="comment">/* ========================================================================= */</span>
<a name="l00474"></a>00474 
<a name="l00475"></a>00475 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00476"></a><a class="code" href="class_e_t_sub_item.html#ac284b5ab60cf721ea1ee3811fc0a1e5b">00476</a> <span class="keywordtype">void</span>            <a class="code" href="class_e_t_sub_item.html#ac284b5ab60cf721ea1ee3811fc0a1e5b" title="removes the item from the ETI_CplxTxt item; may tigger an update">ETSubItem::remove</a>           ( <span class="keywordtype">bool</span> b_recomp )
<a name="l00477"></a>00477 {
<a name="l00478"></a>00478     <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> * top_it;
<a name="l00479"></a>00479 
<a name="l00480"></a>00480     <span class="comment">/* mark the item &quot;dirty&quot; */</span>
<a name="l00481"></a>00481     <a class="code" href="class_e_t_sub_item.html#ab162bc8bf3933ee501bcbc599b6a40f6" title="marks this item and all it&#39;s parents as being required to be recomputed">setSizeDirty</a>(&amp;top_it);
<a name="l00482"></a>00482 <span class="comment"></span>
<a name="l00483"></a>00483 <span class="comment">    /// @todo implement undo function here; instead of deleting, add it to a queue</span>
<a name="l00484"></a>00484 <span class="comment"></span>
<a name="l00485"></a>00485     <span class="comment">/* top level items can&#39;t be destroyed, as they are being embedded */</span>
<a name="l00486"></a>00486 
<a name="l00487"></a>00487     <a class="code" href="main_8h.html#a2fb92e95e9bd37461409b33016829761">LIST_BUG</a> <span class="stringliteral">&quot;the item to remove: &quot;</span> &lt;&lt; <span class="keyword">this</span>
<a name="l00488"></a>00488                                     &lt;&lt; <span class="stringliteral">&quot; the parent: &quot;</span>;
<a name="l00489"></a>00489     top_it-&gt;<a class="code" href="class_e_t_i___cplx_txt.html#a40bc75cf03cbdf6ea4e78dbcfa67005f">dbgDump</a>();
<a name="l00490"></a>00490 
<a name="l00491"></a>00491 
<a name="l00492"></a>00492     <span class="keywordflow">if</span> (!<a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f" title="tell if this element is top level or not">isTopLevel</a>())
<a name="l00493"></a>00493     {
<a name="l00494"></a>00494         <a class="code" href="main_8h.html#a2fb92e95e9bd37461409b33016829761">LIST_BUG</a> <span class="stringliteral">&quot;not top level&quot;</span>;
<a name="l00495"></a>00495 
<a name="l00496"></a>00496         <span class="comment">/* make shure that no viewport uses this pointer */</span>
<a name="l00497"></a>00497         <span class="keywordflow">foreach</span> (QGraphicsView * vp, top_it-&gt;scene()-&gt;views())
<a name="l00498"></a>00498         {
<a name="l00499"></a>00499             <span class="comment">/* we are assuming that all views are ETSheetView !*/</span>
<a name="l00500"></a>00500             <a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> * vp_sv = <span class="keyword">static_cast&lt;</span><a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> *<span class="keyword">&gt;</span>(vp);
<a name="l00501"></a>00501 
<a name="l00502"></a>00502             <span class="keywordflow">if</span> (vp_sv-&gt;<a class="code" href="class_e_t_sheet_view.html#af772d536773e6acb31413fb6a5f8cade" title="tell which is currenly selected sub-item in this view">currentSubI</a>() == <span class="keyword">this</span>)
<a name="l00503"></a>00503             {
<a name="l00504"></a>00504                 <span class="keywordflow">if</span> (vp_sv-&gt;<a class="code" href="class_e_t_sheet_view.html#a566550e7c12d84a8d187f2607ef889f0" title="tells if the sellection appears on the left (true) or on the right (false)">selIsLeft</a>())
<a name="l00505"></a>00505                 {
<a name="l00506"></a>00506                     <span class="keywordflow">if</span> (<a class="code" href="class_e_t_sub_item.html#a3df9a6599da92f5f26e8d030d5080df9" title="return next item">next</a>() != <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)
<a name="l00507"></a>00507                         vp_sv-&gt;<a class="code" href="class_e_t_sheet_view.html#ae2acde853ced4e5b49913cc048fa5abc" title="inform the view that a new current item was decided">setCurrentSubI</a>(top_it, <a class="code" href="class_e_t_sub_item.html#a3df9a6599da92f5f26e8d030d5080df9" title="return next item">next</a>());
<a name="l00508"></a>00508                     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_e_t_sub_item.html#abb6564cd7327657f8739dde913dda297" title="return previous item">prev</a>() != <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)
<a name="l00509"></a>00509                         vp_sv-&gt;<a class="code" href="class_e_t_sheet_view.html#ae2acde853ced4e5b49913cc048fa5abc" title="inform the view that a new current item was decided">setCurrentSubI</a>(top_it, <a class="code" href="class_e_t_sub_item.html#abb6564cd7327657f8739dde913dda297" title="return previous item">prev</a>());
<a name="l00510"></a>00510                     <span class="keywordflow">else</span>
<a name="l00511"></a>00511                         vp_sv-&gt;<a class="code" href="class_e_t_sheet_view.html#ae2acde853ced4e5b49913cc048fa5abc" title="inform the view that a new current item was decided">setCurrentSubI</a>(top_it, <a class="code" href="class_e_t_sub_item.html#a0a367e98b76ea54e1d0c6edf7053330c" title="get the father item">fatherSubI</a>());
<a name="l00512"></a>00512                 }
<a name="l00513"></a>00513                 <span class="keywordflow">else</span>
<a name="l00514"></a>00514                 {
<a name="l00515"></a>00515                     <span class="keywordflow">if</span> (<a class="code" href="class_e_t_sub_item.html#abb6564cd7327657f8739dde913dda297" title="return previous item">prev</a>() != <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)
<a name="l00516"></a>00516                         vp_sv-&gt;<a class="code" href="class_e_t_sheet_view.html#ae2acde853ced4e5b49913cc048fa5abc" title="inform the view that a new current item was decided">setCurrentSubI</a>(top_it, <a class="code" href="class_e_t_sub_item.html#abb6564cd7327657f8739dde913dda297" title="return previous item">prev</a>());
<a name="l00517"></a>00517                     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_e_t_sub_item.html#a3df9a6599da92f5f26e8d030d5080df9" title="return next item">next</a>() != <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)
<a name="l00518"></a>00518                         vp_sv-&gt;<a class="code" href="class_e_t_sheet_view.html#ae2acde853ced4e5b49913cc048fa5abc" title="inform the view that a new current item was decided">setCurrentSubI</a>(top_it, <a class="code" href="class_e_t_sub_item.html#a3df9a6599da92f5f26e8d030d5080df9" title="return next item">next</a>());
<a name="l00519"></a>00519                     <span class="keywordflow">else</span>
<a name="l00520"></a>00520                         vp_sv-&gt;<a class="code" href="class_e_t_sheet_view.html#ae2acde853ced4e5b49913cc048fa5abc" title="inform the view that a new current item was decided">setCurrentSubI</a>(top_it, <a class="code" href="class_e_t_sub_item.html#a0a367e98b76ea54e1d0c6edf7053330c" title="get the father item">fatherSubI</a>());
<a name="l00521"></a>00521                 }
<a name="l00522"></a>00522 
<a name="l00523"></a>00523             }
<a name="l00524"></a>00524         }
<a name="l00525"></a>00525         <a class="code" href="main_8h.html#a2fb92e95e9bd37461409b33016829761">LIST_BUG</a> <span class="stringliteral">&quot;the item to remove: &quot;</span>;
<a name="l00526"></a>00526         <a class="code" href="class_c_c___l2_d.html#a0fc686a4a2d28e87c1e699b94dd71dae" title="print the content of this object to debug output">dbgDump</a>();
<a name="l00527"></a>00527         <a class="code" href="class_e_t_sub_item.html#a0a367e98b76ea54e1d0c6edf7053330c" title="get the father item">fatherSubI</a>()-&gt;<a class="code" href="class_e_t_sub_item.html#a062688dc88d505fb19be5a72f741be43" title="informed when a direct kid is about to be removed">ackRemoveKid</a>(<span class="keyword">this</span>);
<a name="l00528"></a>00528 
<a name="l00529"></a>00529         <span class="comment">/* check for top level elements that contain only one item */</span>
<a name="l00530"></a>00530         <span class="keywordflow">if</span> (<a class="code" href="class_e_t_sub_item.html#a0a367e98b76ea54e1d0c6edf7053330c" title="get the father item">fatherSubI</a>()-&gt;<a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f" title="tell if this element is top level or not">isTopLevel</a>())
<a name="l00531"></a>00531         {
<a name="l00532"></a>00532             <a class="code" href="main_8h.html#a2fb92e95e9bd37461409b33016829761">LIST_BUG</a> <span class="stringliteral">&quot;father is top level&quot;</span>;
<a name="l00533"></a>00533             <span class="keywordflow">if</span> (top_it-&gt;<a class="code" href="class_e_t_i___cplx_txt.html#a4cf00ce26c8020917606ab5b005bda3f" title="get the number of items">count</a>() == 0)
<a name="l00534"></a>00534             {
<a name="l00535"></a>00535                 <a class="code" href="main_8h.html#a2fb92e95e9bd37461409b33016829761">LIST_BUG</a> <span class="stringliteral">&quot;count is 0 =&gt; reinit&quot;</span>;
<a name="l00536"></a>00536                 top_it-&gt;<a class="code" href="class_e_t_i___cplx_txt.html#a90619dcc080b4d3e2bf7e1d3056a8073" title="the item is cleared and brought to a state just like after creation">reinit</a>(<span class="keyword">false</span>);
<a name="l00537"></a>00537             }
<a name="l00538"></a>00538         }
<a name="l00539"></a>00539 
<a name="l00540"></a>00540         <span class="keyword">delete</span> <span class="keyword">this</span>;
<a name="l00541"></a>00541     }
<a name="l00542"></a>00542     <span class="keywordflow">else</span>
<a name="l00543"></a>00543     {
<a name="l00544"></a>00544         <a class="code" href="main_8h.html#a2fb92e95e9bd37461409b33016829761">LIST_BUG</a> <span class="stringliteral">&quot;top level&quot;</span>;
<a name="l00545"></a>00545         top_it-&gt;<a class="code" href="class_e_t_i___cplx_txt.html#a90619dcc080b4d3e2bf7e1d3056a8073" title="the item is cleared and brought to a state just like after creation">reinit</a>(<span class="keyword">false</span>);
<a name="l00546"></a>00546     }
<a name="l00547"></a>00547 
<a name="l00548"></a>00548     <span class="comment">/* recompute the item */</span>
<a name="l00549"></a>00549     <span class="keywordflow">if</span> (b_recomp == <span class="keyword">true</span>)
<a name="l00550"></a>00550     {
<a name="l00551"></a>00551         top_it-&gt;<a class="code" href="class_e_t_i___cplx_txt.html#a7766fe534a3545eae5855d0d1322291a" title="recompute internal data">recompute</a>(<span class="keyword">true</span>);
<a name="l00552"></a>00552     }
<a name="l00553"></a>00553 
<a name="l00554"></a>00554 }
<a name="l00555"></a>00555 <span class="comment">/* ========================================================================= */</span>
<a name="l00556"></a>00556 
<a name="l00557"></a>00557 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00558"></a><a class="code" href="class_e_t_sub_item.html#adc77ab1f44d683c75355b5cf4c519b53">00558</a> <span class="keywordtype">void</span>            <a class="code" href="class_e_t_sub_item.html#adc77ab1f44d683c75355b5cf4c519b53" title="visually deselected; this is not the same thing as the current si">ETSubItem::deselect</a>             (
<a name="l00559"></a>00559         <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> ** fth_, <span class="keywordtype">bool</span>    b_redraw )
<a name="l00560"></a>00560 {
<a name="l00561"></a>00561     <span class="keywordflow">if</span> (!<a class="code" href="class_e_t_sub_item.html#aa9af4f4a692972fa0e6738a1680d8068" title="tell if visually selected; this is not the same thing as the current si">isSelected</a>())
<a name="l00562"></a>00562         <span class="keywordflow">return</span>;
<a name="l00563"></a>00563 
<a name="l00564"></a>00564     <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; (~<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055ad808a4cbe31e2afd93afc9ecef98bb47">SELECTED</a>));
<a name="l00565"></a>00565 
<a name="l00566"></a>00566     <span class="keywordflow">if</span> (b_redraw)
<a name="l00567"></a>00567     {
<a name="l00568"></a>00568         <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> * fth_loc;
<a name="l00569"></a>00569         <span class="keywordflow">if</span> (fth_ == <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)
<a name="l00570"></a>00570         {
<a name="l00571"></a>00571             fth_loc = <a class="code" href="class_e_t_sub_item.html#a73078f093b83442fb1729f6f35bee29f" title="get the ETI_CplxTxt father (complex text)">fatherCplx</a>();
<a name="l00572"></a>00572         }
<a name="l00573"></a>00573         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (*fth_ == <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)
<a name="l00574"></a>00574         {
<a name="l00575"></a>00575             fth_loc = <a class="code" href="class_e_t_sub_item.html#a73078f093b83442fb1729f6f35bee29f" title="get the ETI_CplxTxt father (complex text)">fatherCplx</a>();
<a name="l00576"></a>00576             *fth_ = fth_loc;
<a name="l00577"></a>00577         }
<a name="l00578"></a>00578         <span class="keywordflow">else</span>
<a name="l00579"></a>00579         {
<a name="l00580"></a>00580             fth_loc = *fth_;
<a name="l00581"></a>00581         }
<a name="l00582"></a>00582         fth_loc-&gt;update();
<a name="l00583"></a>00583     }
<a name="l00584"></a>00584 }
<a name="l00585"></a>00585 <span class="comment">/* ========================================================================= */</span>
<a name="l00586"></a>00586 
<a name="l00587"></a>00587 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00588"></a><a class="code" href="class_e_t_sub_item.html#a735df5a65b61d9a1dc508f4f687d225c">00588</a> <span class="keywordtype">void</span>            <a class="code" href="class_e_t_sub_item.html#a735df5a65b61d9a1dc508f4f687d225c" title="visually selected; this is not the same thing as the current si">ETSubItem::select</a>               (
<a name="l00589"></a>00589         <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> ** fth_, <span class="keywordtype">bool</span>    b_redraw )
<a name="l00590"></a>00590 {
<a name="l00591"></a>00591     <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> | <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055ad808a4cbe31e2afd93afc9ecef98bb47">SELECTED</a>);
<a name="l00592"></a>00592 
<a name="l00593"></a>00593     <span class="keywordflow">if</span> (b_redraw)
<a name="l00594"></a>00594     {
<a name="l00595"></a>00595         <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> * fth_loc;
<a name="l00596"></a>00596         <span class="keywordflow">if</span> (fth_ == <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)
<a name="l00597"></a>00597         {
<a name="l00598"></a>00598             fth_loc = <a class="code" href="class_e_t_sub_item.html#a73078f093b83442fb1729f6f35bee29f" title="get the ETI_CplxTxt father (complex text)">fatherCplx</a>();
<a name="l00599"></a>00599         }
<a name="l00600"></a>00600         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (*fth_ == <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)
<a name="l00601"></a>00601         {
<a name="l00602"></a>00602             fth_loc = <a class="code" href="class_e_t_sub_item.html#a73078f093b83442fb1729f6f35bee29f" title="get the ETI_CplxTxt father (complex text)">fatherCplx</a>();
<a name="l00603"></a>00603             *fth_ = fth_loc;
<a name="l00604"></a>00604         }
<a name="l00605"></a>00605         <span class="keywordflow">else</span>
<a name="l00606"></a>00606         {
<a name="l00607"></a>00607             fth_loc = *fth_;
<a name="l00608"></a>00608         }
<a name="l00609"></a>00609         fth_loc-&gt;update();
<a name="l00610"></a>00610     }
<a name="l00611"></a>00611 
<a name="l00612"></a>00612 }
<a name="l00613"></a>00613 <span class="comment">/* ========================================================================= */</span>
<a name="l00614"></a>00614 
<a name="l00615"></a>00615 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00616"></a><a class="code" href="class_e_t_sub_item.html#a6755d46623943a100688e7fd0416cbdd">00616</a> QRectF          <a class="code" href="class_e_t_sub_item.html#a6755d46623943a100688e7fd0416cbdd" title="get the bounding box of this item represented in the item">ETSubItem::boxInItem</a>    (<a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> ** fth)<span class="keyword"> const</span>
<a name="l00617"></a>00617 <span class="keyword"></span>{
<a name="l00618"></a>00618     <span class="keyword">const</span> <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * itr_1 = this-&gt;<a class="code" href="class_e_t_sub_item.html#a0a367e98b76ea54e1d0c6edf7053330c" title="get the father item">fatherSubI</a>();
<a name="l00619"></a>00619     <span class="keyword">const</span> <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * itr_2 = <span class="keyword">this</span>;
<a name="l00620"></a>00620     QRectF rct_t = <a class="code" href="class_e_t_sub_item.html#a8a82d3aad7a84597b451240dc75a0cb4" title="the boundingg box in local coordinates">bbox</a>;
<a name="l00621"></a>00621 
<a name="l00622"></a>00622     <span class="keywordflow">while</span> (itr_1 != <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)
<a name="l00623"></a>00623     {
<a name="l00624"></a>00624         rct_t.translate(itr_1-&gt;<a class="code" href="class_e_t_sub_item.html#a3fdaeb353bed6e19a583e2b371c80583" title="returns the position of the reference point given child in this item&#39;s coordinates">subIRefPt</a>(itr_2));
<a name="l00625"></a>00625 
<a name="l00626"></a>00626         itr_2 = itr_1;
<a name="l00627"></a>00627         itr_1 = ((<a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> *)itr_1)-&gt;<a class="code" href="class_e_t_sub_item.html#a0a367e98b76ea54e1d0c6edf7053330c" title="get the father item">fatherSubI</a>();
<a name="l00628"></a>00628     }
<a name="l00629"></a>00629     <span class="comment">/* itr_2 now has the root item inside ETI_CplxTxt */</span>
<a name="l00630"></a>00630     <span class="keywordflow">if</span> (fth != <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)
<a name="l00631"></a>00631     {
<a name="l00632"></a>00632         *fth = itr_2-&gt;<a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>.<a class="code" href="class_e_t_sub_item.html#a4c061776d7be6a4be93d29a72b7d7789" title="the hosting item, used if this ETSubItem is at top level">fth_cplx</a>;
<a name="l00633"></a>00633     }
<a name="l00634"></a>00634     <span class="keywordflow">return</span> rct_t;
<a name="l00635"></a>00635 
<a name="l00636"></a>00636 }
<a name="l00637"></a>00637 <span class="comment">/* ========================================================================= */</span>
<a name="l00638"></a>00638 
<a name="l00639"></a>00639 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00640"></a><a class="code" href="class_e_t_sub_item.html#a45d5f17e954c49f22904ee97ac04d263">00640</a> QRectF          <a class="code" href="class_e_t_sub_item.html#a45d5f17e954c49f22904ee97ac04d263" title="get the bounding box of this sub-item represented in the scene">ETSubItem::boxInScene</a>   (<a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> ** fth)<span class="keyword"> const</span>
<a name="l00641"></a>00641 <span class="keyword"></span>{
<a name="l00642"></a>00642     <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> * fth_loc;
<a name="l00643"></a>00643     QRectF rct_t = <a class="code" href="class_e_t_sub_item.html#a6755d46623943a100688e7fd0416cbdd" title="get the bounding box of this item represented in the item">boxInItem</a>(&amp;fth_loc);
<a name="l00644"></a>00644     rct_t.translate(fth_loc-&gt;pos());
<a name="l00645"></a>00645     <span class="keywordflow">if</span> (fth != <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)
<a name="l00646"></a>00646     {
<a name="l00647"></a>00647         *fth = fth_loc;
<a name="l00648"></a>00648     }
<a name="l00649"></a>00649     <span class="keywordflow">return</span> rct_t;
<a name="l00650"></a>00650 }
<a name="l00651"></a>00651 <span class="comment">/* ========================================================================= */</span>
<a name="l00652"></a>00652 
<a name="l00653"></a>00653 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00654"></a><a class="code" href="class_e_t_sub_item.html#a3fdaeb353bed6e19a583e2b371c80583">00654</a> QPointF         <a class="code" href="class_e_t_sub_item.html#a3fdaeb353bed6e19a583e2b371c80583" title="returns the position of the reference point given child in this item&#39;s coordinates">ETSubItem::subIRefPt</a>        (<span class="keyword">const</span> <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * p_kid)<span class="keyword"> const</span>
<a name="l00655"></a>00655 <span class="keyword"></span>{
<a name="l00656"></a>00656     <span class="keywordflow">return</span> QPointF(p_kid-&gt;<a class="code" href="class_e_t_sub_item.html#a8eba7b38ff5decd18fc642a99f66d855" title="tell the position of this item in parent&#39;s coordinate system">posX</a>(), 0);
<a name="l00657"></a>00657 }
<a name="l00658"></a>00658 <span class="comment">/* ========================================================================= */</span>
<a name="l00659"></a>00659 
<a name="l00660"></a>00660 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00661"></a><a class="code" href="class_e_t_sub_item.html#af5290d8caa173f73da2ba43616b4be47">00661</a> <span class="keywordtype">void</span>            <a class="code" href="class_e_t_sub_item.html#af5290d8caa173f73da2ba43616b4be47" title="updates the properties of specified item based on DOM element&#39;s content">ETSubItem::loadXMLCmn</a>           (
<a name="l00662"></a>00662         <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * item, QDomElement dom_e )
<a name="l00663"></a>00663 {
<a name="l00664"></a>00664     QDomElement dom_it;
<a name="l00665"></a>00665 
<a name="l00666"></a>00666     <span class="comment">/* if the font entry exists then the item has a different font than</span>
<a name="l00667"></a>00667 <span class="comment">it&#39;s parent */</span>
<a name="l00668"></a>00668     dom_it = dom_e.firstChildElement(<a class="code" href="_e_t_sheet_8h.html#a515ae0df8655fe553a1180b6f9fd4c0c">XML_TAG_FONT</a>);
<a name="l00669"></a>00669     <span class="keywordflow">if</span> (!dom_it.isNull())
<a name="l00670"></a>00670     {
<a name="l00671"></a>00671         <span class="keywordflow">if</span> (!item-&gt;<a class="code" href="class_e_t_sub_item.html#a9c7318d8f6eaca5ffc2f9c04a2e2b3b3" title="the default font that is used to paint this item">itm_font</a>.fromString(dom_it.text()))
<a name="l00672"></a>00672         {
<a name="l00673"></a>00673             qDebug(<span class="stringliteral">&quot;Font was specified for sub-item but &quot;</span>
<a name="l00674"></a>00674                    <span class="stringliteral">&quot;the content could not be parsed &quot;</span>);
<a name="l00675"></a>00675         }
<a name="l00676"></a>00676         item-&gt;<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(item-&gt;<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> | <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a01ebc2d8cfadac52c4633ff69c2f6b31">FONT_MOD</a>);
<a name="l00677"></a>00677         <span class="keywordflow">if</span> (!dom_it.nextSiblingElement(<a class="code" href="_e_t_sheet_8h.html#a515ae0df8655fe553a1180b6f9fd4c0c">XML_TAG_FONT</a>).isNull())
<a name="l00678"></a>00678         {
<a name="l00679"></a>00679             qDebug() &lt;&lt; <span class="stringliteral">&quot;The input presented more than one &quot;</span>
<a name="l00680"></a>00680                      &lt;&lt; <a class="code" href="_e_t_sheet_8h.html#a515ae0df8655fe553a1180b6f9fd4c0c">XML_TAG_FONT</a> &lt;&lt; <span class="stringliteral">&quot; tags, when only one per &quot;</span>
<a name="l00681"></a>00681                      &lt;&lt; <span class="stringliteral">&quot;sub-item element is allowed&quot;</span>;
<a name="l00682"></a>00682         }
<a name="l00683"></a>00683     }
<a name="l00684"></a>00684 
<a name="l00685"></a>00685     <span class="comment">/* if the color entry exists then the item has a different color than</span>
<a name="l00686"></a>00686 <span class="comment">it&#39;s parent */</span>
<a name="l00687"></a>00687     dom_it = dom_e.firstChildElement(<a class="code" href="_e_t_sheet_8h.html#a1aa301ceeef1acb5cefbcab1d26d83fa">XML_TAG_COLOR</a>);
<a name="l00688"></a>00688     <span class="keywordflow">if</span> (!dom_it.isNull())
<a name="l00689"></a>00689     {
<a name="l00690"></a>00690         item-&gt;<a class="code" href="class_e_t_sub_item.html#abbe3ddeaaaeb14e18837d7cfd4180fe3" title="color used to paint this item">itm_col</a>.setNamedColor(dom_it.text());
<a name="l00691"></a>00691         item-&gt;<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(item-&gt;<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> | <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055adf362be8b7054ea6af97d43b7eb694ef">COL_MOD</a>);
<a name="l00692"></a>00692 
<a name="l00693"></a>00693         <span class="keywordflow">if</span> (!dom_it.nextSiblingElement(<a class="code" href="_e_t_sheet_8h.html#a1aa301ceeef1acb5cefbcab1d26d83fa">XML_TAG_COLOR</a>).isNull())
<a name="l00694"></a>00694         {
<a name="l00695"></a>00695             qDebug() &lt;&lt; <span class="stringliteral">&quot;The input presented more than one &quot;</span>
<a name="l00696"></a>00696                      &lt;&lt; <a class="code" href="_e_t_sheet_8h.html#a1aa301ceeef1acb5cefbcab1d26d83fa">XML_TAG_COLOR</a> &lt;&lt; <span class="stringliteral">&quot; tags, when only one per &quot;</span>
<a name="l00697"></a>00697                      &lt;&lt; <span class="stringliteral">&quot;sub-item element is allowed&quot;</span>;
<a name="l00698"></a>00698         }
<a name="l00699"></a>00699     }
<a name="l00700"></a>00700 
<a name="l00701"></a>00701 
<a name="l00702"></a>00702     <span class="comment">/* if the pen entry exists then the item has a different pen than</span>
<a name="l00703"></a>00703 <span class="comment">it&#39;s parent */</span>
<a name="l00704"></a>00704     dom_it = dom_e.firstChildElement(<a class="code" href="_e_t_sheet_8h.html#a8f2907de6987a8875404f159a5c54160">XML_TAG_PEN</a>);
<a name="l00705"></a>00705     <span class="keywordflow">if</span> (!dom_it.isNull())
<a name="l00706"></a>00706     {
<a name="l00707"></a>00707         <span class="keywordtype">bool</span> b_ok = <span class="keyword">false</span>;
<a name="l00708"></a>00708         item-&gt;<a class="code" href="class_e_t_sub_item.html#abf16c501488190ec6a55b402978723c1" title="the rgb used to paint text, draw lines, ...">itm_pen</a> = dom_it.text().toUInt(&amp;b_ok);
<a name="l00709"></a>00709         <span class="keywordflow">if</span> (!b_ok)
<a name="l00710"></a>00710         {
<a name="l00711"></a>00711             qDebug(<span class="stringliteral">&quot;Pen was specified for sub-item but &quot;</span>
<a name="l00712"></a>00712                    <span class="stringliteral">&quot;the content could not be parsed &quot;</span>);
<a name="l00713"></a>00713         }
<a name="l00714"></a>00714         item-&gt;<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(item-&gt;<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> | <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a3d93efa3d56a84ecbd6a997dcacd22f5">PEN_MOD</a>);
<a name="l00715"></a>00715         <span class="keywordflow">if</span> (!dom_it.nextSiblingElement(<a class="code" href="_e_t_sheet_8h.html#a8f2907de6987a8875404f159a5c54160">XML_TAG_PEN</a>).isNull())
<a name="l00716"></a>00716         {
<a name="l00717"></a>00717             qDebug() &lt;&lt; <span class="stringliteral">&quot;The input presented more than one &quot;</span>
<a name="l00718"></a>00718                      &lt;&lt; <a class="code" href="_e_t_sheet_8h.html#a8f2907de6987a8875404f159a5c54160">XML_TAG_PEN</a> &lt;&lt; <span class="stringliteral">&quot; tags, when only one per &quot;</span>
<a name="l00719"></a>00719                      &lt;&lt; <span class="stringliteral">&quot;sub-item element is allowed&quot;</span>;
<a name="l00720"></a>00720         }
<a name="l00721"></a>00721     }
<a name="l00722"></a>00722 
<a name="l00723"></a>00723 
<a name="l00724"></a>00724 }
<a name="l00725"></a>00725 <span class="comment">/* ========================================================================= */</span>
<a name="l00726"></a>00726 
<a name="l00727"></a>00727 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00728"></a><a class="code" href="class_e_t_sub_item.html#ae6ef96172fec911255cdfd2791bb9a5d">00728</a> <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> *     <a class="code" href="class_e_t_sub_item.html#ae6ef96172fec911255cdfd2791bb9a5d" title="updates the properties of specified item based on DOM element&#39;s content">ETSubItem::loadXMLByType</a>    ( QDomElement dom_e )
<a name="l00729"></a>00729 {
<a name="l00730"></a>00730     <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * ret_i = <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>;
<a name="l00731"></a>00731     QDomElement dom_it;
<a name="l00732"></a>00732 <span class="comment"></span>
<a name="l00733"></a>00733 <span class="comment">    /// @todo   code for sub-item types as they are being created</span>
<a name="l00734"></a>00734 <span class="comment"></span>    <span class="comment">/* the one and only common data to all kinds of sub-items */</span>
<a name="l00735"></a>00735     dom_it = dom_e.firstChildElement(<a class="code" href="_e_t_sheet_8h.html#afe714690ff664710e0dfea992dedb48a">XML_TAG_TYPE</a>);
<a name="l00736"></a>00736     <span class="keywordflow">if</span> (!dom_it.isNull())
<a name="l00737"></a>00737     {
<a name="l00738"></a>00738         QString s_ty = dom_it.text();
<a name="l00739"></a>00739         <span class="keywordflow">if</span> (s_ty == <a class="code" href="_e_t_sheet_8h.html#ad14995bfc219eb6a0ce55cdd58193145">XML_SIT_FRACT</a>)
<a name="l00740"></a>00740         {
<a name="l00741"></a>00741             <span class="comment">// ETSI_Fract * ret_spc = new ETSI_Fract();</span>
<a name="l00742"></a>00742             <span class="comment">// ret_i = ret_spc;</span>
<a name="l00743"></a>00743             <span class="comment">// ret_spc-&gt;loadXML(dom_e);</span>
<a name="l00744"></a>00744         }
<a name="l00745"></a>00745         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (s_ty == <a class="code" href="_e_t_sheet_8h.html#ad1769246a39d8d7c441cb4aea0c4bd56">XML_SIT_HTEXT</a>)
<a name="l00746"></a>00746         {
<a name="l00747"></a>00747             <span class="comment">// ETSI_HText * ret_spc = new ETSI_HText();</span>
<a name="l00748"></a>00748             <span class="comment">// ret_i = ret_spc;</span>
<a name="l00749"></a>00749             <span class="comment">// ret_spc-&gt;loadXML(dom_e);</span>
<a name="l00750"></a>00750         }
<a name="l00751"></a>00751         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (s_ty == <a class="code" href="_e_t_sheet_8h.html#a01390a9ef586c8bb27e4f62b1b684dd3">XML_SIT_INTEG</a>)
<a name="l00752"></a>00752         {
<a name="l00753"></a>00753             <span class="comment">// ETSI_Integ * ret_spc = new ETSI_Integ();</span>
<a name="l00754"></a>00754             <span class="comment">// ret_i = ret_spc;</span>
<a name="l00755"></a>00755             <span class="comment">// ret_spc-&gt;loadXML(dom_e);</span>
<a name="l00756"></a>00756         }
<a name="l00757"></a>00757         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (s_ty == <a class="code" href="_e_t_sheet_8h.html#aa896b0216165e435be9986d72f4f79c8">XML_SIT_LIM</a>)
<a name="l00758"></a>00758         {
<a name="l00759"></a>00759             <span class="comment">// ETSI_Lim * ret_spc = new ETSI_Lim();</span>
<a name="l00760"></a>00760             <span class="comment">// ret_i = ret_spc;</span>
<a name="l00761"></a>00761             <span class="comment">// ret_spc-&gt;loadXML(dom_e);</span>
<a name="l00762"></a>00762         }
<a name="l00763"></a>00763         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (s_ty == <a class="code" href="_e_t_sheet_8h.html#a56e812cb8d57dee67e7fd807dbc759c5">XML_SIT_LOGICAC</a>)
<a name="l00764"></a>00764         {
<a name="l00765"></a>00765             <span class="comment">// ETSI_LogicAc * ret_spc = new ETSI_LogicAc();</span>
<a name="l00766"></a>00766             <span class="comment">// ret_i = ret_spc;</span>
<a name="l00767"></a>00767             <span class="comment">// ret_spc-&gt;loadXML(dom_e);</span>
<a name="l00768"></a>00768         }
<a name="l00769"></a>00769         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (s_ty == <a class="code" href="_e_t_sheet_8h.html#a369dddf4a767ded127a59b87a1c4cfda">XML_SIT_MATRIX</a>)
<a name="l00770"></a>00770         {
<a name="l00771"></a>00771             <span class="comment">// ETSI_Matrix * ret_spc = new ETSI_Matrix();</span>
<a name="l00772"></a>00772             <span class="comment">// ret_i = ret_spc;</span>
<a name="l00773"></a>00773             <span class="comment">// ret_spc-&gt;loadXML(dom_e);</span>
<a name="l00774"></a>00774         }
<a name="l00775"></a>00775         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (s_ty == <a class="code" href="_e_t_sheet_8h.html#aef0980d11e0dfde8a4ff7a71416f5d4e">XML_SIT_RADIC</a>)
<a name="l00776"></a>00776         {
<a name="l00777"></a>00777             <span class="comment">// ETSI_Radic * ret_spc = new ETSI_Radic();</span>
<a name="l00778"></a>00778             <span class="comment">// ret_i = ret_spc;</span>
<a name="l00779"></a>00779             <span class="comment">// ret_spc-&gt;loadXML(dom_e);</span>
<a name="l00780"></a>00780         }
<a name="l00781"></a>00781         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (s_ty == <a class="code" href="_e_t_sheet_8h.html#a55c1113b806e669aedfff171c5f25c03">XML_SIT_STEXT</a>)
<a name="l00782"></a>00782         {
<a name="l00783"></a>00783             ret_i = <a class="code" href="class_e_t_s_i___s_text.html#ae4539deb5c75b718eae825adbcfae5dc" title="creates a new item based on DOM element&#39;s content">ETSI_SText::loadXML</a>(dom_e);
<a name="l00784"></a>00784         }
<a name="l00785"></a>00785         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (s_ty == <a class="code" href="_e_t_sheet_8h.html#ae9fd719bddd901a526408cd4d8565c4c">XML_SIT_SUM</a>)
<a name="l00786"></a>00786         {
<a name="l00787"></a>00787             <span class="comment">// ETSI_Sum * ret_spc = new ETSI_Sum();</span>
<a name="l00788"></a>00788             <span class="comment">// ret_i = ret_spc;</span>
<a name="l00789"></a>00789             <span class="comment">// ret_spc-&gt;loadXML(dom_e);</span>
<a name="l00790"></a>00790         }
<a name="l00791"></a>00791         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (s_ty == <a class="code" href="_e_t_sheet_8h.html#a60d1bd520c61614f6fb52c21323cffd5">XML_SIT_ROOT</a>)
<a name="l00792"></a>00792         {
<a name="l00793"></a>00793             ret_i = <a class="code" href="class_e_t_s_i___root.html#ad5660a6bf953040bbfc4d9fc86764f91" title="creates a new item based on DOM element&#39;s content">ETSI_Root::loadXML</a>(dom_e);
<a name="l00794"></a>00794         }
<a name="l00795"></a>00795         <span class="keywordflow">else</span>
<a name="l00796"></a>00796         {
<a name="l00797"></a>00797             qDebug() &lt;&lt; <span class="stringliteral">&quot;ETSubItem::loadXMLByType did not create an &quot;</span>
<a name="l00798"></a>00798                      &lt;&lt; <span class="stringliteral">&quot;sub-item because provided type (&quot;</span>
<a name="l00799"></a>00799                      &lt;&lt; s_ty &lt;&lt; <span class="stringliteral">&quot;) did match none of the known types.&quot;</span>;
<a name="l00800"></a>00800             <span class="keywordflow">return</span> <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>;
<a name="l00801"></a>00801         }
<a name="l00802"></a>00802 
<a name="l00803"></a>00803 
<a name="l00804"></a>00804         <span class="keywordflow">if</span> (!dom_it.nextSiblingElement(<a class="code" href="_e_t_sheet_8h.html#afe714690ff664710e0dfea992dedb48a">XML_TAG_TYPE</a>).isNull())
<a name="l00805"></a>00805         {
<a name="l00806"></a>00806             qDebug() &lt;&lt; <span class="stringliteral">&quot;The input presented more than one &quot;</span>
<a name="l00807"></a>00807                      &lt;&lt; <a class="code" href="_e_t_sheet_8h.html#afe714690ff664710e0dfea992dedb48a">XML_TAG_TYPE</a> &lt;&lt; <span class="stringliteral">&quot; tags, when only one per &quot;</span>
<a name="l00808"></a>00808                      &lt;&lt; <span class="stringliteral">&quot;sub-item element is allowed&quot;</span>;
<a name="l00809"></a>00809         }
<a name="l00810"></a>00810     }
<a name="l00811"></a>00811     <span class="keywordflow">else</span>
<a name="l00812"></a>00812     {
<a name="l00813"></a>00813         qDebug() &lt;&lt; <span class="stringliteral">&quot;ETSubItem::loadXMLByType did not create an &quot;</span>
<a name="l00814"></a>00814                  &lt;&lt; <span class="stringliteral">&quot;sub-item because no &quot;</span> &lt;&lt; <a class="code" href="_e_t_sheet_8h.html#afe714690ff664710e0dfea992dedb48a">XML_TAG_TYPE</a> &lt;&lt; <span class="stringliteral">&quot; tag &quot;</span>
<a name="l00815"></a>00815                  &lt;&lt; <span class="stringliteral">&quot; was found. &quot;</span>;
<a name="l00816"></a>00816         <span class="keywordflow">return</span> <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>;
<a name="l00817"></a>00817     }
<a name="l00818"></a>00818 
<a name="l00819"></a>00819     <span class="keywordflow">return</span> ret_i;
<a name="l00820"></a>00820 }
<a name="l00821"></a>00821 <span class="comment">/* ========================================================================= */</span>
<a name="l00822"></a>00822 
<a name="l00823"></a>00823 
<a name="l00824"></a>00824 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00825"></a><a class="code" href="class_e_t_sub_item.html#a02697af655fba4041b231ac18b529691">00825</a> <span class="keywordtype">void</span>        <a class="code" href="class_e_t_sub_item.html#a02697af655fba4041b231ac18b529691" title="saves common properties to provided DOM element">ETSubItem::saveXMLCmn</a>       (
<a name="l00826"></a>00826     QDomElement dom_e)
<a name="l00827"></a>00827 {
<a name="l00828"></a>00828 
<a name="l00829"></a>00829     QDomElement dom_it;
<a name="l00830"></a>00830     QDomText dom_tx;
<a name="l00831"></a>00831 
<a name="l00832"></a>00832     <span class="comment">/* save font */</span>
<a name="l00833"></a>00833     <span class="keywordflow">if</span> ((<a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f" title="tell if this element is top level or not">isTopLevel</a>()) || (!<a class="code" href="class_e_t_sub_item.html#a6a5005b03cbfc320dad9a38809a2717d" title="tell if the sub-item inherits the font or uses it&#39;s own">inheritsFont</a>()))
<a name="l00834"></a>00834         {
<a name="l00835"></a>00835             dom_it = dom_e.ownerDocument().createElement(<a class="code" href="_e_t_sheet_8h.html#a515ae0df8655fe553a1180b6f9fd4c0c">XML_TAG_FONT</a>);
<a name="l00836"></a>00836             dom_e.appendChild(dom_it);
<a name="l00837"></a>00837             dom_tx = dom_e.ownerDocument().createTextNode(<a class="code" href="class_e_t_sub_item.html#a9c7318d8f6eaca5ffc2f9c04a2e2b3b3" title="the default font that is used to paint this item">itm_font</a>.toString());
<a name="l00838"></a>00838             dom_it.appendChild(dom_tx);
<a name="l00839"></a>00839         }
<a name="l00840"></a>00840 
<a name="l00841"></a>00841 
<a name="l00842"></a>00842     <span class="comment">/* save color */</span>
<a name="l00843"></a>00843     <span class="keywordflow">if</span> ((<a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f" title="tell if this element is top level or not">isTopLevel</a>()) || (!<a class="code" href="class_e_t_sub_item.html#aa883fef005da263c7b8465f9fde9ec7c" title="tell if the sub-item inherits the font or uses it&#39;s own">inheritsColor</a>()))
<a name="l00844"></a>00844         {
<a name="l00845"></a>00845             dom_it = dom_e.ownerDocument().createElement(<a class="code" href="_e_t_sheet_8h.html#a1aa301ceeef1acb5cefbcab1d26d83fa">XML_TAG_COLOR</a>);
<a name="l00846"></a>00846             dom_e.appendChild(dom_it);
<a name="l00847"></a>00847             dom_tx = dom_e.ownerDocument().createTextNode(<a class="code" href="class_e_t_sub_item.html#abbe3ddeaaaeb14e18837d7cfd4180fe3" title="color used to paint this item">itm_col</a>.name());
<a name="l00848"></a>00848             dom_it.appendChild(dom_tx);
<a name="l00849"></a>00849         }
<a name="l00850"></a>00850 
<a name="l00851"></a>00851 
<a name="l00852"></a>00852     <span class="comment">/* save pen */</span>
<a name="l00853"></a>00853     <span class="keywordflow">if</span> ((<a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f" title="tell if this element is top level or not">isTopLevel</a>()) || (!<a class="code" href="class_e_t_sub_item.html#a864c91187ae6dfbd7420b5a5bc192369" title="tell if the sub-item inherits the font or uses it&#39;s own">inheritsPen</a>()))
<a name="l00854"></a>00854         {
<a name="l00855"></a>00855             dom_it = dom_e.ownerDocument().createElement(<a class="code" href="_e_t_sheet_8h.html#a8f2907de6987a8875404f159a5c54160">XML_TAG_PEN</a>);
<a name="l00856"></a>00856             dom_e.appendChild(dom_it);
<a name="l00857"></a>00857             dom_tx = dom_e.ownerDocument()
<a name="l00858"></a>00858                     .createTextNode(QString(<span class="stringliteral">&quot;%1&quot;</span>).arg(<a class="code" href="class_e_t_sub_item.html#abf16c501488190ec6a55b402978723c1" title="the rgb used to paint text, draw lines, ...">itm_pen</a>));
<a name="l00859"></a>00859             dom_it.appendChild(dom_tx);
<a name="l00860"></a>00860         }
<a name="l00861"></a>00861 
<a name="l00862"></a>00862 
<a name="l00863"></a>00863 }
<a name="l00864"></a>00864 <span class="comment">/* ========================================================================= */</span>
<a name="l00865"></a>00865 
<a name="l00866"></a>00866 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00867"></a><a class="code" href="class_e_t_sub_item.html#aaa26d242a3df778008a48b2df8fd5b36">00867</a> <span class="keywordtype">void</span>            <a class="code" href="class_e_t_sub_item.html#aaa26d242a3df778008a48b2df8fd5b36" title="the sub-item is to become current sub-item in viewport">ETSubItem::makeCurrent</a>          (<a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> * vp)
<a name="l00868"></a>00868 {
<a name="l00869"></a>00869     vp-&gt;<a class="code" href="class_e_t_sheet_view.html#ab25d1eedd8c99747c31e8a63b461b9b6" title="perform all actions required to make this item current in this view">makeCurrentSubI</a>(<a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <span class="keyword">this</span>);
<a name="l00870"></a>00870 }
<a name="l00871"></a>00871 <span class="comment">/* ========================================================================= */</span>
<a name="l00872"></a>00872 
<a name="l00873"></a>00873 
<a name="l00874"></a>00874 <span class="comment">/*  CLASS    =============================================================== */</span>
<a name="l00875"></a>00875 <span class="comment">//</span>
<a name="l00876"></a>00876 <span class="comment">//</span>
<a name="l00877"></a>00877 <span class="comment">//</span>
<a name="l00878"></a>00878 <span class="comment">//</span>
<a name="l00879"></a>00879 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00880"></a>00880 <span class="comment">/* ========================================================================= */</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="_e_t_sub_item_8cc.html">ETSubItem.cc</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

    <li class="footer">Generated on Sun Oct 23 2011 22:06:48 for EquTemper by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </li>
   </ul>
 </div>
</body>
</html>
